<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of TaskView
 *
 * @author markus
 */
class NotificationView {
    
    public static function display(Notification $task){
        echo '<div class="notification_item';
        if($task->getImportant() == 1){ echo ' important'; }
        echo '">';
        echo '<div class="notification_title" title="'.$task->getId().'">'.$task->getTitle().'</div>';
        echo '<div class="notification_content">'.$task->getContent().'</div>';
        echo '<div class="notification_info">Von '.$task->getCreator().' am '.date("d.m.Y", strtotime($task->getAdded())).' um '.date("H:i", strtotime($task->getAdded())).' Uhr. ';
        echo $task->getArchived() == 1 ? 'Archiviert am '.date("d.m.Y", strtotime($task->getModified())).'. ' : '<a class="link_archive" href="?action=archive&id='.$task->getId().'">Archivieren.</a>';
        echo '</div>';
        echo '</div>';
    }
    
}

?>
